#!/bin/bash
set -u

MYSQL55_PATH='/usr/local/mysql55'

wget https://github.com/mysql/mysql-server/archive/refs/tags/mysql-5.5.63.tar.gz \
&& tar xzf mysql-5.5.63.tar.gz \
&& cd mysql-server-mysql-5.5.63/ \
&& cmake . -DCMAKE_INSTALL_PREFIX=$MYSQL55_PATH \
-DMYSQL_DATADIR=$MYSQL55_PATH/data \
-DDOWNLOAD_BOOST=1 \
-DWITH_BOOST=/tmp/boost \
-DWITH_SSL=bundled \
&& make \
&& make install \
&& cd .. \
&& rm -rf mysql-5.5.63.tar.gz mysql-server-mysql-5.5.63
